/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.plotnikov.pricemaker.patterns.observer;

import java.awt.Font;

/**
 *
 * @author alexey
 */
public class DrawObject implements Cloneable{

    protected int width = 0;
    protected int height = 0;
    protected String drawString = "";
    protected int fontSize =1;
    protected String fontName = "Times New Roman";
    protected int fontStyle = Font.PLAIN;
    protected String controlName = "";

    public DrawObject(int width, int height, String str, int fontsize, String fontname, int fontstyle,
            String controlname) {
        this.width = width;
        this.height = height;
        this.drawString = new String(str);
        this.fontSize = fontsize;
        this.fontName = new String(fontname);
        this.fontStyle = fontstyle;
        this.controlName = new String(controlname);
    }

    public String getControlName(){
        return controlName;
    }

    public void setControlName(String controlName) {
        this.controlName = controlName;
    }

    public void setFontSize(int size){
        fontSize = size;
    }

    public void setFontName(String fontName) {
        this.fontName = fontName;
    }

    public void setFontStyle(int fontStyle) {
        this.fontStyle = fontStyle;
    }

    public String getFontName() {
        return fontName;
    }

    public int getFontSize() {
        return fontSize;
    }

    public int getFontStyle() {
        return fontStyle;
    }

    public String drawString(){
        return drawString;
    }

    public int getWidth() {
        return width;
    }

    public int getHeight() {
        return height;
    }

    public void up(int move) {
        height -= move;
    }

    public void down(int move) {
        height += move;
    }

    public void left(int move) {
        width -= move;
    }

    public void right(int move) {
        width += move;
    }

    public void setDrawString(String drawString) {
        this.drawString = drawString;
    }

    public String getDrawString() {
        return drawString;
    }

    @Override
    public Object clone() throws CloneNotSupportedException {
        return new DrawObject(width, height, fontName, fontSize, fontName, fontStyle, controlName);
    }

}
